<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取当前的Yaf_Application实例</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.yaf-application.html">Yaf_Application</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-application.bootstrap.html">Yaf_Application::bootstrap</a></div>
 <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="yaf-application.app" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Yaf_Application::app</h1>
  <p class="verinfo">(Yaf &gt;=1.0.0)</p><p class="refpurpose"><span class="refname">Yaf_Application::app</span> &mdash; <span class="dc-title">获取当前的<a href="class.yaf-application.html" class="classname">Yaf_Application</a>实例</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-yaf-application.app-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>Yaf_Application::app</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
    返回<a href="class.yaf-application.html" class="classname">Yaf_Application</a>的实例，
    也可以使用<span class="methodname"><a href="yaf-dispatcher.getapplication.html" class="methodname">Yaf_Dispatcher::getApplication()</a></span>来得到<a href="class.yaf-application.html" class="classname">Yaf_Application</a>的实例
    <span class="methodname"><a href="yaf-dispatcher.getapplication.html" class="methodname">Yaf_Dispatcher::getApplication()</a></span>.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-yaf-application.app-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-yaf-application.app-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
    返回值为一个<a href="class.yaf-application.html" class="classname">Yaf_Application</a>的实例，
    如果在调用之前没有初始化一个<a href="class.yaf-application.html" class="classname">Yaf_Application</a>实例的话，它将返回NULL
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-yaf-application.app-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="methodname"><a href="yaf-dispatcher.getapplication.html" class="methodname" rel="rdfs-seeAlso">Yaf_Dispatcher::getApplication()</a> - 获取当前的Yaf_Application实例</span></li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="class.yaf-application.html">Yaf_Application</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="yaf-application.bootstrap.html">Yaf_Application::bootstrap</a></div>
 <div class="up"><a href="class.yaf-application.html">Yaf_Application</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
